Skip to content

mcpx: regenerate ops.gen.ts + generate it during the nix build - #4807

Merged
dezren39 merged 3 commits into
mainfrom
mcpx-ops-gen-codegen
Nov 3, 2026
Merged

dezren39 merged 3 commits into
mainfrom
mcpx-ops-gen-codegen

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Fixes #4806 two ways, so it cannot recur for nix consumers:

  1. Regenerate pkgs/mcpx/plugin/opencode/mcpx/ops.gen.ts from the current /v1 table (go test ./internal/api -run TestPluginOpsAreGenerated -update). The diff is large (165 insertions, 341 deletions) — the table drifted through several API changes that landed without regenerating; the generated file now matches the generator again, and the plain go test freshness guard passes on the tree.
  2. package.nix gains a preCheck that regenerates ops.gen.ts in the build tree before the check phase compares it. The file stays checked in (the TypeScript plugin consumes it from the source tree), and the freshness test still guards it for plain go test runs — but a nix build of this package can never again go red because the checked-in copy went stale, which is what blocked every nix consumer building mcpx from main.

Verification (laptop, full nix builds): this branch builds fully green; and the branch with ops.gen.ts reverted to the stale main copy ALSO builds green, proving the preCheck regeneration is what carries it.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 08:41
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T08:41:42.233796Z
We couldn’t complete this review. Comment @codex review to try again.
d28bfb1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 074f92cf-0af5-49ec-a459-bfecbc0e6a71
Commits

Reviewing files that changed from the base of the PR and between 627e26d and 0200203.

Files selected for processing: 3
  • pkgs/mcpx/internal/buildcheck/checkphase_test.go
  • pkgs/mcpx/package.nix
  • pkgs/mcpx/plugin/opencode/mcpx/ops.gen.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39

dezren39 commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

Verification round 1 (laptop, two full builds): the codegen mechanism is PROVEN — with the stale ops.gen.ts restored into the tree, internal/api still passes, because preCheck regenerates it in the build tree. But both builds fail one test: buildcheck's hand-named-package guard (regex over package.nix) trips on the preCheck's own go test ./internal/api -run ... -update line. The guard's purpose is the check phase narrowing its list; the preCheck is a codegen step naming the generator's home package. Fixed in the new commit: the guard's scan carves out the preCheck block, with the reason documented in the test. Re-verifying.

@dezren39

dezren39 commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

Verification round 2 (laptop, two full builds): branch as-is is FULLY GREEN (zero failing tests — the first time this package's suite has been green from a current tree in this sequence), and the stale-file variant is STILL GREEN, proving the preCheck regeneration carries it. Merging; this closes #4806.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mcpx: plugin/opencode/mcpx/ops.gen.ts is stale — TestPluginOpsAreGenerated fails on main

1 participant